package com.fengyi.library.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * 负载均衡配置类
 */
@Configuration
public class LoadBalancerConfig {

    /**
     * 创建一个计数器，用于实现轮询负载均衡效果
     */
    @Bean
    public AtomicInteger requestCounter() {
        return new AtomicInteger(0);
    }

} 